package com.example.springboot_practice.Service;

import com.example.springboot_practice.Entity.Sort;
import com.example.springboot_practice.Entity.Student;
import com.example.springboot_practice.Mapper.MapperOne.SortMapper;
import com.example.springboot_practice.Mapper.MapperTwo.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 测试配置多数据源
 * @Author 王宝凯
 * @Date 2020/9/10
 */
@Service
public class TestService {
    @Autowired
    SortMapper sortMapper;
    @Autowired
    StudentMapper studentMapper;
    public List<Sort> sortList(){
        List<Sort> sortList = sortMapper.getAllSorts();
        return sortList;
    }

    public List<Student> studentList(){
        List<Student> studentList = studentMapper.getAllStudents();
        return studentList;
    }


}

